<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:01 GMT -->

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/dist/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/plugins/datapicker/datepicker3.css" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>订单列表</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="row m-b-xs">
                            <form method="get">
                                <div class="col-sm-2 m-b-xs">
                                    <input type="text" placeholder="收货人" value="{:input('param.consignee')}" name="consignee"
                                        class="form-control">
                                </div>
                                <div class="col-sm-2 m-b-xs">
                                    <input type="text" placeholder="订单编号" value="{:input('param.order_sn')}" name="order_sn"
                                        class="form-control">
                                </div>
                                <div class="col-sm-3 m-b-xs">
                                    <div class="input-daterange input-group" id="datepicker">
                                        <input type="text" class=" form-control" name="start_time" value="{:input('param.start_time')}"
                                            placeholder="下单日期" />
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class=" form-control" name="end_time" value="{:input('param.end_time')}"
                                            placeholder="下单日期" />
                                    </div>
                                </div>
                                <div class="col-sm-2 m-b-xs">
                                    <select class="form-control" name="pay_status">
                                        <option value="">支付状态</option>
                                        {foreach name="pay_status" key="key" item="value"}
                                        <option value="{$key}" {if condition="$key == input('param.pay_status') && input('param.pay_status')!=null"}selected{/if}>
                                            {$value} 
                                        </option> 
                                        {/foreach} 
                                    </select> 
                                </div> 
                                <div class="col-sm-2 m-b-xs">
                                    <select class="form-control" name="pay_code">
                                        <option value="">支付方式</option>
                                        {foreach name="pay_code" key="key" item="value"}
                                        <option value="{$key}" {if condition="$key == input('param.pay_code') && input('param.pay_code')!=null"}selected{/if}>
                                            {$value} 
                                        </option> 
                                        {/foreach} 
                                    </select> 
                                </div> 
                                <div class="col-sm-2 m-b-xs">
                                    <select class="form-control" name="order_status">
                                        <option value="">订单状态</option>
                                        {foreach name="order_status" key="key" item="value"}
                                        <option value="{$key}" {if condition="$key == input('param.order_status') && input('param.order_status')!=null"}selected{/if}>
                                            {$value} 
                                        </option> 
                                        {/foreach}
                                        <option value="-1">已取消</option> 
                                        <option value="-99">已超时</option> 
                                    </select> 
                                </div>
                                {if condition="$store_id elt 0"}
                                <div class="col-sm-2 m-b-xs">
                                    <select class="form-control" name="store_id">
                                        <option value="0">所属门店</option>
                                        {foreach name="stores" item="value"}
                                        <option value="{$value.id}" {if condition="input('param.store_id')!=null && $value.id == input('param.store_id')"}selected{/if}>
                                            {$value.name} 
                                        </option> 
                                        {/foreach} 
                                    </select> 
                                </div>
                                {else/}
                                <input type="hidden" name="store_id" value="{$store_id}">
                                {/if}
                                <div class="col-sm-2 m-b-xs">
                                    <select class="form-control" name="order_mode">
                                        <option value="">订单类型</option>
                                        <option value="0" {if condition="input('param.order_mode')!=null && 0 == input('param.order_mode')"}selected{/if}>
                                            购买
                                        </option> 
                                        <option value="1" {if condition="input('param.order_mode')!=null && 1 == input('param.order_mode')"}selected{/if}>
                                            租借
                                        </option> 
                                    </select> 
                                </div>
                                <div class="col-sm-1">
                                    <button type="button" onclick="ajax_index()" class="btn btn-primary">
                                        <span class="fa fa-search"></span> 搜索
                                    </button>
                                </div>
                            </form>
                        </div>
                        <div id="ajax_index_box">

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="__PUBLIC__/dist/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/dist/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/dist/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="__PUBLIC__/dist/js/content.min.js?v=1.0.0"></script>
    <script src="__PUBLIC__/dist/js/plugins/iCheck/icheck.min.js"></script>
    <script src="__PUBLIC__/dist/js/demo/peity-demo.min.js"></script>
    <script src="__PUBLIC__/dist/js/plugins/datapicker/bootstrap-datepicker.js"></script>
    <script>
        $(document).ready(function () { $(".i-checks").iCheck({ checkboxClass: "icheckbox_square-green", radioClass: "iradio_square-green", }) });
        $('#datepicker').datepicker();
        function ajax_index(p) {
            if (!p || p <= 0) {
                p = 1;
            }
            $.ajax({
                url: "{:Url('Order/ajax_index')}?p=" + p + '&randno=' + Math.random(),
                data: $('form').serialize(),
                type: 'post',
                success: function (res) {
                    $('#ajax_index_box').html(res);
                }
            })
        }
        ajax_index();
        
        $('.audit_returns').click(function () {
            var order_id = $('#current_order_id').val();
            var audit_remark = $('#return_remark').val();
            var status = $(this).attr('data-state');
            if (id > 0) {
                $.ajax({
                    url: "{:Url('Order/audit_returns')}",
                    data: { order_id: order_id, audit_remark:audit_remark, status:status },
                    type: "post",
                    success: function (data) {
                        if (data == 1) {
                            $('#current_order_id').val(0);
                            window.location = "{:Url('Order/index')}";
                        } else {
                            alert('审核归还失败');
                        }
                    }
                });
            } else {
                alert('归还记录不存在');
            }
        });
    </script>

</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:01 GMT -->

</html>